package com.ayu.gulimall.seckill.controller;


import com.ayu.gulimall.seckill.service.SeckillService;
import com.ayu.gulimall.seckill.to.SeckillSkuRedisTO;
import com.ayu.gulimall.seckill.vo.SeckillSessionWithSkus;
import com.ayu.gulimall.seckill.vo.SeckillSkuVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/seckill")
public class SeckillController {

    @Autowired
    SeckillService seckillService;

    @RequestMapping("/getCurrentSeckillSkus")
    public List<SeckillSkuRedisTO> getSkuVO(){
        List<SeckillSkuRedisTO> vos=  seckillService.getCurrentSeckillSkus();
        System.out.println("vos = " + vos);
        return vos;
    }
}
